import {
	http,
} from '@/utils/request.js';

/**
 *  登录接口
 * @param {*} data 
 * @returns 
 */
export const postLogin = (data) => {
	return http({
		method: 'post',
		url: `/login`,
		data,

	});
};
/**
 *  注册
 * @param {*} data 
 * @returns 
 */
export const postRegister = (data) => {
	return http({
		method: 'post',
		url: `/register`,
		data,

	});
};

/**
 * 重置密码
 */
export const putResetPassword = (accountId,newPassword="123456") => {
	return http({
		method: 'put',
		url: `/user/resetPassword/${accountId}/${newPassword}`,

	});
};

/**
 * 留言
 */
export const leaveWord = (data) => {
	return http({
		method: 'post',
		url: `/user/leaveWord`,
		data

	});
};
/**
 * 获取课程记录留言列表
 */
export const getLeaveWordByRecordId = (data) => {
	return http({
		method: 'get',
		url: `/user/getLeaveWordByRecordId`,
		data

	});
};
/**
 * 获取课程记录留言列表
 */
export const getLeaveWordByRecordStuId = (data) => {
	return http({
		method: 'get',
		url: `/user/getLeaveWordByRecordStuId`,
		data

	});
};
/**
 * 获取课程记录留言列表
 */
export const delLwById = (id) => {
	return http({
		method: 'delete',
		url: `/user/delLwById/${id}`,

	});
};


